















#ifdef U
#include"ProcessBar.h"

void DownLoad(int DataVolum,int pace)
{
    char buffer[MAX_SIZE];
    memset(buffer,'\0',sizeof(buffer));
    int count = 0;
    char str[4] = {'/','|','\\','\0'}; 
    int current = 0;
    while(current <= DataVolum) // "=" 才可以达到100
    {
        printf("[%-101s]%d%% {%c}\r",buffer,count,str[current%sizeof(str)]);
        fflush(stdout);
        current += pace; 
        count = current*100/DataVolum;
        buffer[count] = ICON;
        usleep(20000);
    }
    printf("\nDownload finished , %d byte have transmitted",DataVolum);
}

int main()
{
    //Version1();
    DownLoad(1024,6);
    return 0;
}

#endif